<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>首页</title>
    <link href="css/mui.min.css" rel="stylesheet" />
    <link href="css/iconfont.css" rel="stylesheet"/>
    <link href="css/swiper.min.css" rel="stylesheet"/>
    <link href="css/MUIxinyingCss.css" rel="stylesheet"/>
</head>
<style type="text/css">
.content_box{
	
	
	height:-moz-calc(100% - (40px)) !important;
  	height:-webkit-calc(100% - (40px)) !important;
  	height:-o-calc(100% - (40px) ) !important;
  	height: calc(100% - (40px) ) !important;
}
html,body,.mui-content,.mui-control-content{height: 100%;}
 .mui-page-content{
	 height: 100%;
  }
</style>
<body>
	<header class="mui-bar mui-bar-nav header_bar">
		<div class="left_position" id="location"><a href="##">广州</a></div>
		<h1 class="mui-title">首页</h1>
		<div class="right_msg"><a href="##" class="new_msg" id="news"><img src="images/top_right_msg.png" alt="top_right_msg" /></a></div>
	</header>
	<nav class="mui-bar mui-bar-tab footer_bar">
			<a class="mui-tab-item mui-active" href="#index_list">
				<span class="iconfont icon-home"></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a class="mui-tab-item" href="#tab-webview-subpage-circle">
				<span class="iconfont icon-quanzi"></span>
				<span class="mui-tab-label">发现圈子</span>
			</a>
			<a class="mui-tab-item" href="#personal_center">
				<span class="iconfont icon-personalCenter"></span>
				<span class="mui-tab-label">个人中心</span>
			</a>
			<a class="mui-tab-item" href="#more_content">
				<span class="iconfont icon-more"></span>
				<span class="mui-tab-label">更多</span>
			</a>
		</nav>
		<div class="mui-content">
			<div id="index_list" class="mui-control-content mui-active">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
				<div class="banner">
				    <div class="swiper-container">
				        <div class="swiper-wrapper" id="banner_img">
			        		<div class="swiper-slide"><img src="images/index_banner0.png" alt="banner" /></div>
			        		<div class="swiper-slide"><img src="images/index_list_1.png" alt="banner" /></div>
				        </div>
				        <!-- Add Pagination -->
				        <div class="swiper-pagination"></div>
				    </div>
				</div>
		        <ul class="mui-table-view mui-grid-view mui-grid-9 index_list">
		            <li class="mui-table-view-cell mui-media mui-col-xs-6">
		            	<a href="##" id="line_ask">
		                    <img src="images/index_list_1.png" alt="index_list_1"  />
		            	</a>
		            </li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-6">
		            	<a href="##" id="cloud">
		                    <img src="images/index_list_2.png" alt="index_list_2"  />
		            	</a>
		            </li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-6">
		            	<a href="##" id="device">
		                    <img src="images/index_list_3.png" alt="index_list_3"  />
		            	</a>
		            </li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-6">
		            	<a href="login.html" id="clinic"><!--alists/clinic.html-->
		                    <img src="images/index_list_4.png" alt="index_list_4"  />
		            	</a>
		            </li>
		        </ul>
		        <div class="marquee_box"><marquee loop="-1" scrollamount="2">热烈欢迎全国最佳妇科、口腔、耳鼻喉科进驻</marquee></div>
		        <ul class="mui-table-view doctor_list" id="doctor_list">
					<li class="mui-table-view-cell mui-media">
						<a href="javascript:;">
							<img class="mui-media-object mui-pull-left" src="images/index_banner0.png">
							<div class="mui-media-body">
								<h1>王莉 内科 主任医师</h1>
								<p class='mui-ellipsis'>能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
								<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
							</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media">
						<a href="javascript:;">
							<img class="mui-media-object mui-pull-left" src="images/index_banner0.png">
							<div class="mui-media-body">
								<h1>王莉 内科 主任医师</h1>
								<p class='mui-ellipsis'>想要这样一间小木屋，夏天挫冰吃瓜，冬天围炉取暖.</p>
								<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
							</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media">
						<a href="javascript:;">
							<img class="mui-media-object mui-pull-left" src="images/index_banner0.png">
							<div class="mui-media-body">
								<h1>王莉 内科 主任医师</h1>
								<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
								<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
							</div>
						</a>
					</li>
				</ul>
				</div>
				</div>
			</div>
			<div id="tab-webview-subpage-circle" class="mui-control-content">
				<div class="mui-page-content">
					<div class="mui-content">
						<div class="paddlr">
							<div id="segmentedControl" class="mui-segmented-control mui-segmented-control-inverted mui-segmented-control-primary">
								<a class="mui-control-item mui-active" href="#comprehensive">
									热点
								</a>
								<a class="mui-control-item" href="#recovery_rate">
									蕊影社区
								</a>
								<a class="mui-control-item" href="#highest_score">
									两性
								</a>
								<a class="mui-control-item" href="#highest_score">
									育儿
								</a>
						</div>
						</div>
						<div class="content_box">
							<div id="comprehensive" class="mui-control-content mui-active">
							<div class="mui-scroll-wrapper">
		   						<div class="mui-scroll">
								<div class="circle_banner">
									<div id="slider" class="mui-slider" >
										<div class="mui-slider-group mui-slider-loop">
											<!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
											<div class="mui-slider-item mui-slider-item-duplicate">
												<a href="##">
													<img src="images/index_list_1.png">
												</a>
											</div>
											<!-- 第一张 -->
											<div class="mui-slider-item">
												<a href="##">
													<img src="images/index_banner0.png">
												</a>
											</div>
											<!-- 第二张 -->
											<div class="mui-slider-item">
												<a href="##">
													<img src="images/index_list_1.png">
												</a>
											</div>
											<!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
											<div class="mui-slider-item mui-slider-item-duplicate">
												<a href="##">
													<img src="images/index_banner0.png">
												</a>
											</div>
										</div>
										<div class="mui-slider-indicator">
											<div class="mui-indicator mui-active"></div>
											<div class="mui-indicator"></div>
										</div>
									</div>
								</div>
								<div class="circle_list_box">
									<ul class="mui-table-view">
										<li class="mui-table-view-cell mui-media">
											<a href="javascript:;" class="link_detail">
												<img class="mui-media-object mui-pull-left" src="images/liBoxImg.png">
												<div class="mui-media-body">
													<h6>幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福</h6>
													<p class="mui-ellipsis">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
												</div>
											</a>
											<div class="list_bottom_ico clear">
												<div class="mui-pull-left mui-col-sm-5"><time class="mui-col-sm-6">2015-11-14</time><span class="list_up_name  mui-col-sm-6">蕊影社区</span></div>
												<div class="mui-pull-right mui-col-sm-6 the_good">
													<a href="##" class="mui-col-sm-4 xingxing">10</a>
													<a href="##" class="mui-col-sm-4 good">30</a>
													<a href="##" class="mui-col-sm-4 message">20</a>
												</div>
											</div>
										</li>
										<li class="mui-table-view-cell mui-media">
											<a href="javascript:;" class="link_detail">
												<img class="mui-media-object mui-pull-left" src="images/liBoxImg.png">
												<div class="mui-media-body">
													<h6>幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福</h6>
													<p class="mui-ellipsis">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
												</div>
											</a>
											<div class="list_bottom_ico clear">
												<div class="mui-pull-left mui-col-sm-5"><time class="mui-col-sm-6">2015-11-14</time><span class="list_up_name  mui-col-sm-6">蕊影社区</span></div>
												<div class="mui-pull-right mui-col-sm-6 the_good">
													<a href="##" class="mui-col-sm-4 xingxing">10</a>
													<a href="##" class="mui-col-sm-4 good">30</a>
													<a href="##" class="mui-col-sm-4 message">20</a>
												</div>
											</div>
										</li>
										<li class="mui-table-view-cell mui-media">
											<a href="javascript:;" class="link_detail">
												<img class="mui-media-object mui-pull-left" src="images/liBoxImg.png">
												<div class="mui-media-body">
													<h6>幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福</h6>
													<p class="mui-ellipsis">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
												</div>
											</a>
											<div class="list_bottom_ico clear">
												<div class="mui-pull-left mui-col-sm-5"><time class="mui-col-sm-6">2015-11-14</time><span class="list_up_name  mui-col-sm-6">蕊影社区</span></div>
												<div class="mui-pull-right mui-col-sm-6 the_good">
													<a href="##" class="mui-col-sm-4 xingxing">10</a>
													<a href="##" class="mui-col-sm-4 good">30</a>
													<a href="##" class="mui-col-sm-4 message">20</a>
												</div>
											</div>
										</li>
										<li class="mui-table-view-cell mui-media">
											<a href="javascript:;" class="link_detail">
												<img class="mui-media-object mui-pull-left" src="images/liBoxImg.png">
												<div class="mui-media-body">
													<h6>幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福幸福</h6>
													<p class="mui-ellipsis">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
												</div>
											</a>
											<div class="list_bottom_ico clear">
												<div class="mui-pull-left mui-col-sm-5"><time class="mui-col-sm-6">2015-11-14</time><span class="list_up_name  mui-col-sm-6">蕊影社区</span></div>
												<div class="mui-pull-right mui-col-sm-6 the_good">
													<a href="##" class="mui-col-sm-4 xingxing">10</a>
													<a href="##" class="mui-col-sm-4 good">30</a>
													<a href="##" class="mui-col-sm-4 message">20</a>
												</div>
											</div>
										</li>
									</ul>
								</div>
								</div>
							</div>
							</div>
							<div id="recovery_rate" class="mui-control-content">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第二个选项卡子项-1
									</li>
									<li class="mui-table-view-cell">
										第二个选项卡子项-2
									</li>
									<li class="mui-table-view-cell">
										第二个选项卡子项-3
									</li>
								</ul>
							</div>
							<div id="highest_score" class="mui-control-content">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第三个选项卡子项-1
									</li>
									<li class="mui-table-view-cell">
										第三个选项卡子项-2
									</li>
									<li class="mui-table-view-cell">
										第三个选项卡子项-3
									</li>
								</ul>
							</div>
						</div>
						</div>
				</div>
			</div>
			<!--个人中心-->
			<div id="personal_center" class="mui-control-content">
				<div class="personal_header personal_center_header">
					<div class="personal_img clear">
				    		<img src="images/doctor_img.png" alt="ing">
				    		<p>王大锤</p>
				    </div>				    
				    <div class="personal_msg">
				    	<ul>
				        	<li>
				        		<h5>126</h5>
				        		<p>余额</p>
				        	</li>
				        	<li id="myDevice">
				        		<h5>126</h5>
				        		<p>我的服务</p>
				        	</li>
				        	<li id="myCollection">
				        		<h5>126%</h5>
				        		<p>我的收藏</p>
				        	</li>
				        </ul>
				    </div>
				</div>
				<div class="personal_center_list">
					<ul class="mui-table-view personal_center_list_1">
						<li class="mui-table-view-cell">							
							<a class="mui-navigate-right" id="member_upgrade">
								<span class="iconfont icon-huiyuanqia"></span>
								会员升级
							</a>
						</li>
						<li class="mui-table-view-cell">
							
							<a class="mui-navigate-right"  id="my_community">
								<span class="iconfont icon-shequ"></span>
								蕊影社区
							</a>
						</li>
						<li class="mui-table-view-cell">							
							<a class="mui-navigate-right" id="inquiry_ticket">
								<span class="iconfont icon-quickquan"></span>
								问诊券
							</a>
						</li>
					</ul>
					<ul class="mui-table-view personal_center_list_2">
						<li class="mui-table-view-cell">							
							<a class="mui-navigate-right" id="feedback_in">
								<span class="iconfont icon-fankui"></span>
								意见反馈
							</a>
						</li>
						<li class="mui-table-view-cell">							
							<a class="mui-navigate-right" id="about_me">
								<span class="iconfont icon-guanyu"></span>
								关于软件介绍
							</a>
						</li>
						<li class="mui-table-view-cell">							
							<a class="mui-navigate-right" id="personalShare">
								<span class="iconfont icon-fenxiang"></span>
								分享下载给好友
							</a>
						</li>
					</ul>
					<ul class="mui-table-view personal_center_list_3">
						<li class="mui-table-view-cell">							
							<a class="mui-navigate-right" id="security_setting">
								<span class="iconfont icon-shezhi"></span>
								设置
							</a>
						</li>
					</ul>
				</div>
			</div>
			<!--更多-->
			<div id="more_content" class="mui-control-content">
				<p class="mui-text-center" style="margin-top: 20%;">敬请期待！</p>
			</div>
			</div>
	
    <script src="js/mui.min.js"></script>
    <script src="js/jquery-1.11.2.min.js"></script>
	<script src="js/mui.lazyload.js"></script>
	<script src="js/mui.lazyload.img.js"></script>    
    <script src="js/swiper.min.js"></script>
    <script src="js/jquery.fakecrop.js"></script>
    <script type="text/javascript" charset="utf-8">
    	//mui初始化
    	mui.init();
		//首页返回键处理
		//处理逻辑：1秒内，连续两次按返回键，则退出应用；
		var first = null;
		mui.back = function() {
		//首次按键，提示‘再按一次退出应用’
		if (!first) {
		first = new Date().getTime();
		mui.toast('再按一次退出应用');
		setTimeout(function() {
		first = null;
		}, 1000);
		} else {
		if (new Date().getTime() - first < 1000) {
		plus.runtime.quit();
		}
		}
		};
		//banner轮播
		function swipe(banner){
		var swiper = new Swiper(banner+' .swiper-container', {
			pagination: banner+' .swiper-pagination',
			autoplay: 2500,
			//paginationClickable: true,
			loop: true
			});
		};
		swipe(".banner");
		//banner轮播限制大小
		function fakecrop(banner){
			$(banner+' .swiper-slide img').fakecrop({
				imgW:$(window).width(),
				imgH:$(banner+' .swiper-slide:eq(1) img').height()
			});
		};
		fakecrop(".banner");
		function fakecrop_circle(banner){
			$(banner+' .mui-slider-item img').fakecrop({
				imgW:$(window).width(),
				imgH:$('.banner .swiper-slide:eq(1) img').height()
			});
		};
		fakecrop_circle(".circle_banner");
		var doctor_list_img = function(count) {
			var fragment = document.createDocumentFragment();
			var li=null;
			for (var i = 0; i < count; i++) {
				var liA='<a href="javascript:;">';
					liA+='<img class="mui-media-object mui-pull-left" data-lazyload="images\/index_list_'+ (i%4+1) +'.png">';
					liA+='<div class="mui-media-body">';
					liA+='<h1><span style="color:red;">'+(i+1)+'</span>王莉 内科 主任医师</h1>';
					liA+='<p class="mui-ellipsis">能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>';
					liA+='<p class="mui-ellipsis">烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>';
					liA+='</div></a>';
				li = document.createElement('li');
				li.className = 'mui-table-view-cell mui-medi';
				li.innerHTML = liA;
				fragment.appendChild(li);
			};
			return fragment;
		};
		(function($) {
			var list = document.getElementById("doctor_list");
			list.innerHTML="";
			list.appendChild(doctor_list_img(26));
			$(document).imageLazyload({
				placeholder: 'images/index_banner0.png'
			});
			$("#doctor_list").on("tap","a",function(e){
				mui.openWindow({
					    url: 'alists/index_doctor_deatail.html', 
					    id:'index_doctor_deatail',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					     }
					  	});
			});
			$(".circle_list_box").on("tap","a.link_detail",function(e){
				mui.openWindow({
					    url: 'alists/article_detial.html', 
					    id:'article',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					     }
					  	});
			});
			$(".the_good").on("tap","a.message",function(e){
				mui.openWindow({
					    url: 'alists/message_publish.html', 
					    id:'message_publish',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					     }
					  	});
			});
			//阻尼系数
				var deceleration = mui.os.ios?0.003:0.0009;
				function scrollId(wrapper){
					$(wrapper).scroll({
						bounce: false,
						indicators: true, //是否显示滚动条
						deceleration:deceleration
					});
				};
				scrollId('.mui-scroll-wrapper');
				
				$.ready(function() {
					//循环初始化所有下拉刷新，上拉加载。
					$.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) {
						$(pullRefreshEl).pullToRefresh({
							down: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										var ul = self.element.querySelector('.mui-table-view');
										ul.insertBefore(createFragment(ul, index, 2, true), ul.firstChild);
										self.endPullDownToRefresh();
									}, 1000);
								}
							},
							up: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										var ul = self.element.querySelector('.mui-table-view');
										ul.appendChild(createFragment(ul, index, 1));
										self.endPullUpToRefresh();
									}, 1000);
								}
							}
						});
					});
					var createFragment = function(ul, index, count, reverse) {
						var length = ul.querySelectorAll('li').length;
						var fragment = document.createDocumentFragment();
						var li;
						for (var i = 0; i < count; i++) {
							li = document.createElement('li');
							li.className = 'mui-table-view-cell';
							li.innerHTML = '第' + (index + 1) + '个选项卡子项-' + (length + (reverse ? (count - i) : (i + 1)));
							fragment.appendChild(li);
						}
						return fragment;
					};
				});
		
		})(mui);
		var slider = mui("#slider");
		slider.slider({
			interval:0
		});
		//定位跳转
		document.getElementById("location").addEventListener('tap',function (e) {
			mui.openWindow({
					    url: 'alists/location.html', 
					    id:'location.html',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					     }
					  	});
					  	//console.log("OK");
				});
				
		
		//消息跳转
		document.getElementById("news").addEventListener('tap',function () {
			mui.openWindow({
					    url: 'alists/news.html', 
					    id:'news.html',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					    }
					  });
				});		
		//跳转到免费咨询
		document.getElementById("line_ask").addEventListener('tap',function () {
			mui.openWindow({
					    url: 'alists/line_ask.html',
					    id:'line_ask',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					    }
					  	})
				});	
		//跳转到云病历
		document.getElementById("cloud").addEventListener('tap',function () {
			mui.openWindow({
					    url: 'alists/cloud.html', 
					    id:'cloud',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					    }
					  	})
				});	
		//跳转到医疗设备
		document.getElementById("device").addEventListener('tap',function () {
			mui.openWindow({
					    url: 'alists/device.html', 
					    id:'device',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					     }
					  	})
			});
		
		//跳转到名医义诊
//		document.getElementById("clinic").addEventListener('tap',function () {
//			mui.openWindow({
//					    url: 'alists/clinic.html', 
//					    id:'clinic',
//					    waiting:{
//					      autoShow:true,//自动显示等待框，默认为true
//					      title:'正在加载...'//等待对话框上显示的提示内容
//					     }
//					  	});
//				});

//跳转到个人资料
document.querySelector(".personal_img").addEventListener('tap',function () {
	mui.openWindow({
			    url: 'alists/personal_data.html', 
			    id:'personal_data',
			    waiting:{
			      autoShow:true,//自动显示等待框，默认为true
			      title:'正在加载...'//等待对话框上显示的提示内容
			     }
			  	})
	});
//跳转到我的服务
document.querySelector("#myDevice").addEventListener('tap',function () {
	mui.openWindow({
			    url: 'alists/my_service.html', 
			    id:'my_service',
			    waiting:{
			      autoShow:true,//自动显示等待框，默认为true
			      title:'正在加载...'//等待对话框上显示的提示内容
			     }
			  	})
	});
//跳转到我的收藏
document.querySelector("#myCollection").addEventListener('tap',function () {
	mui.openWindow({
			    url: 'alists/my_collection.html', 
			    id:'my_collection',
			    waiting:{
			      autoShow:true,//自动显示等待框，默认为true
			      title:'正在加载...'//等待对话框上显示的提示内容
			     }
			  	})
});
	
//跳转到我的充值
document.querySelector("#member_upgrade").addEventListener('tap',function () {
	mui.openWindow({
    url: 'alists/member_upgrade.html', 
    id:'member_upgrade',
    waiting:{
      autoShow:true,//自动显示等待框，默认为true
      title:'正在加载...'//等待对话框上显示的提示内容
     }
  	});
});

//跳转到蕊影社区
document.querySelector("#my_community").addEventListener('tap',function () {
	mui.openWindow({
    url: 'alists/my_community.html', 
    id:'member_upgrade',
    waiting:{
      autoShow:true,//自动显示等待框，默认为true
      title:'正在加载...'//等待对话框上显示的提示内容
     }
  	});
});	

//跳转到问诊券
document.querySelector("#inquiry_ticket").addEventListener('tap',function () {
	mui.openWindow({
    url: 'alists/inquiry_ticket.html', 
    id:'inquiry_ticket',
    waiting:{
      autoShow:true,//自动显示等待框，默认为true
      title:'正在加载...'//等待对话框上显示的提示内容
     }
  	});
});	
//跳转到关于
document.querySelector("#about_me").addEventListener('tap',function () {
	mui.openWindow({
    url: 'alists/about_me.html', 
    id:'about_me',
    waiting:{
      autoShow:true,//自动显示等待框，默认为true
      title:'正在加载...'//等待对话框上显示的提示内容
     }
  	});
});	
//跳转到意见反馈
document.querySelector("#feedback_in").addEventListener('tap',function () {
	mui.openWindow({
    url: 'alists/feedback_in.html', 
    id:'feedback_in',
    waiting:{
      autoShow:true,//自动显示等待框，默认为true
      title:'正在加载...'//等待对话框上显示的提示内容
     }
  	});
});

//跳转到安全设置
document.querySelector("#security_setting").addEventListener('tap',function () {
	mui.openWindow({
    url: 'alists/security_setting.html', 
    id:'security_setting',
    waiting:{
      autoShow:true,//自动显示等待框，默认为true
      title:'正在加载...'//等待对话框上显示的提示内容
     }
  	});
});
//分享操作
		var shares = {};
		mui.plusReady(function() {
			plus.share.getServices(function(s) {
				if (s && s.length > 0) {
					for (var i = 0; i < s.length; i++) {
						var t = s[i];
						shares[t.id] = t;
					}
				}
			}, function() {
				console.log("获取分享服务列表失败");
			});
		});
		
		/*setTimeout(function () {
			defaultImg();
			setTimeout(function() {
				initImgPreview();
			}, 300);
		},500);*/
		
		//分享链接点击事件
		document.getElementById("personalShare").addEventListener('tap', function() {
			var ids = [{
					id: "weixin",
					ex: "WXSceneSession"
				}, {
					id: "weixin",
					ex: "WXSceneTimeline"
				}, {
					id: "sinaweibo"
				}, {
					id: "tencentweibo"
				}, {
					id: "qq"
				}],
				bts = [{
					title: "发送给微信好友"
				}, {
					title: "分享到微信朋友圈"
				}, {
					title: "分享到新浪微博"
				}, {
					title: "分享到腾讯微博"
				}, {
					title: "分享到QQ"
				}];
			plus.nativeUI.actionSheet({
				cancel: "取消",
				buttons: bts
			}, function(e) {
				var i = e.index;
				if (i > 0) {
					var s_id = ids[i - 1].id;
					var share = shares[s_id];
					if (share) {
						if (share.authenticated) {
							shareMessage(share, ids[i - 1].ex);
						} else {
							share.authorize(function() {
								shareMessage(share, ids[i - 1].ex);
							}, function(e) {
								console.log("认证授权失败：" + e.code + " - " + e.message);
							});
						}
					} else {
						mui.toast("无法获取分享服务，请检查manifest.json中分享插件参数配置，并重新打包")
					}
				}
			});
		});

		function shareMessage(share, ex) {
			var msg = {
				extra: {
					scene: ex
				}
			};
			msg.href = "http://www.dcloud.io/hellomui/";
			msg.title = "最接近原生APP体验的高性能前端框架";
			msg.content = "我正在体验HelloMUI，果然很流畅，基本看不出和原生App的差距";
			if (~share.id.indexOf('weibo')) {
				msg.content += "；体验地址：http://www.dcloud.io/hellomui/";
			}
			msg.thumbs = ["_www/images/logo.png"];
			share.send(msg, function() {
				console.log("分享到\"" + share.description + "\"成功！ ");
			}, function(e) {
				console.log("分享到\"" + share.description + "\"失败: " + e.code + " - " + e.message);
			});
		}
    </script>
</body>
</html>